#include "Opcodes.h"

#define CODENAME(c, a)	{c, #c, a}

namespace SoParse
{
	CodeName codeNames[] =
	{
		CODENAME(SAVE_CONTEXT, 0),
		CODENAME(RESTORE_CONTEXT, 0),
		CODENAME(CANCEL_CONTEXT, 0),
		CODENAME(IGNORE, 0),
		CODENAME(ADD_IGNORE, 1),
		CODENAME(POP_IGNORE, 0),
		CODENAME(READ_CHAR, 0),
		CODENAME(READ_A_CHAR, 2),
		CODENAME(READ_CHAR_RANGE, 2),
		CODENAME(READ_CHAR_IN, 1),
		CODENAME(SET_REG, 2),
		CODENAME(INC_REG, 2),
		CODENAME(DEC_REG, 2),
		CODENAME(IF, 2),
		CODENAME(IF_NOT, 2),
		CODENAME(SKIP_NEXT, 0),
		CODENAME(LOAD, 1),
		CODENAME(GO_BACK, 0),
		CODENAME(GO_TO, 1),
		CODENAME(ADD_REPEAT, 2),
		CODENAME(DEC_REPEAT, 0),
		CODENAME(POP_REPEAT, 0),
		CODENAME(RESTORE_CONTEXT_AND_GO_BACK, 0),
		CODENAME(CANCEL_CONTEXT_AND_GO_BACK, 0),
		CODENAME(OPCODE_END, 0),
		{0, "!!!ERROR!!!", 0}
	};

}
